package com.hc.springboot.task;

import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class Scheduler1Task {

	private int count = 0;
	
	@Async
	@Scheduled(cron = "*/6 * * * * ?")
	public void process() throws InterruptedException {
		for (int i = 0; i < 10; i++) {
			Thread.sleep(1000);
			System.out.println("this is scheduler task running " + (count++));
		}
	}
}
